DecodeData

Syntax: @DecodeData {stringname/filename}, {STRING/FILE}, {TXT/XML} [,unknownItemStr[,singleObjectName]]

The DecodeData command can be used to decode the data from a previously encoded STRING or FILE specified as stringname or filename back into the relevant variables (ie. the variables as defined within the encoded string or file). This can be done for either text (TXT) data or XML data. Any items that cannot be decoded can be placed in the optional unknnownItemStr variable. If necessary a single object can be decoded from the data using the optional singleObjectName variable.

Example

@DecodeData 'c:myfile.txt', FILE, TXT, ErrorString

Packaging Runtime Data

Most applications require user-entered input Data and inference-generated output data to be "packaged" (into a String Variable or a Text File) for sharing, storage and retrieval at runtime. There are two commands to enable this - @EncodeData and @DecodeData. These commands generate/interpret the packaged data in either TXT or XML formats.

The @EncodeData Command can be used to automatically package all the data captured using Dialogs for the runtime session. This command can also be used to package any other specified object data. The @DecodeData command is used to "unpackage" the data into their Objects variables.

String variables are limited to 64K in size except when the string is defined as variable length and also is assigned its value via the @EncodeData command in this situation the string has an unlimited size. It is important to note the restriction on the use of unlimited length string variables; these strings can only be assigned values longer than 64K chars via the @EncodeData command, in other words they cannot be assigned, copied or manipulated in any other way.

The main purpose of this is to allow XML data, which is often massive in size, to be sent and received from Knowledge Builder rich client Web applications using strings rather than files.